package com.yumeng.common.helper.bean;

import java.util.Collection;

/**
 * 比较两个list的差异结果集
 *
 * @author wxd
 * @date 2022/5/23 15:37
 */
public class CollectionDiffBo<T> {

    /** 相同的 */
    private Collection<T> sameList;
    /** 新增的 */
    private Collection<T> addList;
    /** 删除的 */
    private Collection<T> delList;

    public int getTotalSize(){
        int sameSize = sameList != null ? sameList.size() : 0;
        int addSize = addList != null ? addList.size() : 0;
        int delSize = delList != null ? delList.size() : 0;
        return sameSize + addSize + delSize;
    }

    public Collection<T> getSameList() {
        return sameList;
    }

    public void setSameList(Collection<T> sameList) {
        this.sameList = sameList;
    }

    public Collection<T> getAddList() {
        return addList;
    }

    public void setAddList(Collection<T> addList) {
        this.addList = addList;
    }

    public Collection<T> getDelList() {
        return delList;
    }

    public void setDelList(Collection<T> delList) {
        this.delList = delList;
    }
}
